$items=array('flyer_135', 'flyer_250', 'folders', 'magazines', 'kaarten', 'visitekaartjes', 'briefpapier', 'posters', 'stickers', 'andere_producten');
foreach ($items as $value) {
if ($var_array[1]==$value) {
echo "";
}
else {
echo "";
}
}
?>
|
if ($var_array[2]=="aanvraag") {
echo " ";
if ($_SERVER['REQUEST_METHOD']=="POST") {
// Mail verzenden
echo "";
echo "";
echo "";
echo "";
echo " | ";
echo " ";
echo "";
echo "
| ";
echo " ";
echo "";
echo "";
$sql="SELECT ".$var_array[4]." as aantal FROM producten WHERE page='".$var_array[1]."' AND info='grootheden'";
$result=mysql_query($sql) or die(mysql_error());
$grootheid=mysql_fetch_object($result);
$sql="SELECT detail_1, ".$var_array[4]." as prijs FROM producten WHERE idProduct='".$var_array[3]."'";
$result=mysql_query($sql) or die(mysql_error());
$row=mysql_fetch_object($result);
$content=explode("/", $row->prijs);
$prijs=trim($content[1]);
if (is_numeric($prijs)) {
$prijs.=",-";
}
if ($prijs=="") {
$prijs=$row->prijs;
}
$bericht="Product: ".value2name($var_array[1])."\n\n";
$bericht.="Formaat: ".$row->detail_1."\n\n";
$bericht.="Aantal: ".$grootheid->aantal."\n\n";
$bericht.="Prijs: ".$prijs."\n\n";
$bericht.="Accountnummer: ".$_POST['accountnummer']."\n\n";
$bericht.="Naam: ".$_POST['naam']."\n\n";
$bericht.="Bedrijf: ".$_POST['bedrijf']."\n\n";
$bericht.="Tel.: ".$_POST['telefoon']."\n\n";
$bericht.="Email: ".$_POST['email']."\n\n";
$onderwerp="Bestelling flyer-express.nl";
mail("info@flyer-express.nl", $onderwerp, $bericht,"From: info@flyer-express.nl");
echo "Bedankt voor uw aanvraag, wij nemen z.s.m. contact met u op!";
echo " | ";
echo " ";
echo " ";
}
else {
$sql="SELECT ".$var_array[4]." as aantal FROM producten WHERE page='".$var_array[1]."' AND info='grootheden'";
$result=mysql_query($sql) or die(mysql_error());
$grootheid=mysql_fetch_object($result);
$sql="SELECT detail_1, ".$var_array[4]." as prijs FROM producten WHERE idProduct='".$var_array[3]."'";
$result=mysql_query($sql) or die(mysql_error());
$row=mysql_fetch_object($result);
$content=explode("/", $row->prijs);
$prijs=trim($content[1]);
if (is_numeric($prijs)) {
$prijs.=",-";
}
if ($prijs=="") {
$prijs=$row->prijs;
}
echo " |